package com.dbms.controller;

import com.dbms.common.annotation.ResponseResult;
import com.dbms.domain.vo.FloodmapSiteVO;
import com.dbms.domain.vo.FloodmapStationPropagateVO;
import com.dbms.service.FloodmapStationPropagateService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Tag(name = "控制站面管理", description = "控制站面管理相关接口")
@RestController
@RequestMapping("/floodmapStationPropagate")
@RequiredArgsConstructor
public class FloodmapStationPropagateController {

    final FloodmapStationPropagateService floodmapStationPropagateService;

    @Operation(summary = "根据河流获取控制站面列表", description = "根据河流获取控制站面列表")
    @GetMapping("/getListBySiteId")
    public ResponseResult<List<FloodmapStationPropagateVO>> getListBySiteId(@RequestParam("siteId") Long siteId){
        return ResponseResult.success(floodmapStationPropagateService.getListBySiteId(siteId));
    }
}
